﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HotelManager.BusinessLogic.Abstract;
using HotelManager.DataAccess;
using HotelManager.DataAccess.Abstract;
using HotelManager.DataAccess.Model;

namespace HotelManager.BusinessLogic.Concrete
{
    public class LocationService : ILocationService
    {
        private ILocationRepository locationRepository;

        public LocationService(ILocationRepository repository)
        {
            locationRepository = repository;
        }

        public List<Country> GetAllCountries()
        {
            return locationRepository.GetAllCountries();
        }

        public List<City> GetCitiesByCountry(int countryId)
        {
            return locationRepository.GetCitiesByCountry(countryId);
        }
        public bool AddContact(ContactModel contact)
        {
            return locationRepository.AddContact(contact);
        }
    }
}
